package com.asset.pojo;

import java.util.Date;

public class Asset {
    public enum Status{
	//资产状态   使用中、已分配、维修中、备用、报废
        Using("使用中",(short)0),Assigned("已分配",(short)1),Maintenance("维修中",(short)2),Spare("备用",(short) 3),Scrap("报废",(short)4);
        public short value;
		public String name;
		Status(String name,short value){
			this.value = value;
			this.name = name;
		}
		public static String getName(short value) {
	        for (Status c : Status.values()) {  
	            if (c.getValue() == value) {  
	                return c.name;  
	            }  
	        }  
	        return null;  
	    } 
		public static short getValue(String name) {
            for (Status c : Status.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        } 
        public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
		
    }
    public enum UsePosition{
		//	使用地点   无锡、上海、北京、深圳、香港、厦门
		WuXi("无锡",(short)0),ShangHai("上海",(short)1),BeiJing("北京",(short)2),ShenZhen("深圳",(short)3),XiangGang("香港",(short)4),XiaMen("厦门",(short)5);
		public short value;
		public String name;
		UsePosition(String name,short value){
			this.value = value;
			this.name = name;
		}
		public static String getName(short value) {
            for (UsePosition c : UsePosition.values()) {  
                if (c.getValue() == value) {  
                    return c.name;  
                }  
            }  
            return null;  
        } 
		public static short getValue(String name) {
            for (UsePosition c : UsePosition.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        } 
		public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
	}
	public enum EquipGenre{
		//	资产类别   笔记本、台式电脑主机、显示器、打印机、无线设备、交换机、移动存储设备、软件、其他配件
		Notebook("笔记本",(short)0),DesktopPC("台式电脑主机",(short)1),Monitor("显示器",(short)2),Printer("打印机",(short)3),
		WirelessDevice("无线设备",(short) 4),SwitchBoard("交换机",(short)5),Storage("移动存储设备",(short)6),
		Software("软件",(short)7),OtherDevice("其他配件",(short) 8);
		public short value;
		public String name;
		EquipGenre(String name,short value){
			this.value = value ;
			this.name = name;
		}
		public static String getName(short value) {
            for (EquipGenre c : EquipGenre.values()) {  
                if (c.getValue() == value) {  
                    return c.name;  
                }  
            }  
            return null;  
        } 
		public static short getValue(String name) {
            for (EquipGenre c : EquipGenre.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        }
		public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
	}
	public enum Source{
		//	来源   异地调配、采购
		Allocaltion("异地调配",(short)0),Buy("采购",(short)1);
		public short value;
		public String name;
		Source(String name,short value){
			this.value = value;
			this.name = name;
		}
		public static String getName(short value) {
            for (Source c : Source.values()) {  
                if (c.getValue() == value) {  
                    return c.name;  
                }  
            }  
            return null;  
        } 
		public static short getValue(String name) {
            for (Source c : Source.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        }
		public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
	}

	private long id;
	private String equipIdentifier;//资产编号
	private String itCode;  //it编号
	private Short equipGenre;//设备类别
	private String equipModel;//设备型号
	private String usePerson;//使用人员
	private String useDepart;//use_depart
	private String usePosition;//使用地点
	private String condition;//使用状况
	private Short source;//设备来源
	private String assetAllocation;//资产配置
	private Date buyTime;//购买时间
	private Date usedTime;//开始使用时间
	private Date modifyTime;//最近修改时间
	private int ifPd;//1:已经判点，0或2没有被盘点
	private String remarks;
	private Short status; //资产状态
	public String getEquipModel() {
		return equipModel;
	}
	public void setEquipModel(String equipModel) {
		this.equipModel = equipModel;
	}
	public Date getBuyTime() {
		return buyTime;
	}
	public void setBuyTime(Date buyTime) {
		this.buyTime = buyTime;
	}
	public String getCondition() {
		return condition;
	}
	public void setCondition(String condition) {
		this.condition = condition;
	}
	public String getEquipIdentifier() {
		return equipIdentifier;
	}
	public void setEquipIdentifier(String equipIdentifier) {
		this.equipIdentifier = equipIdentifier;
	}
	public Date getUsedTime() {
		return usedTime;
	}
	public void setUsedTime(Date usedTime) {
		this.usedTime = usedTime;
	}
	public String getUsePerson() {
		return usePerson;
	}
	public void setUsePerson(String usePerson) {
		this.usePerson = usePerson;
	}
	public String getUseDepart() {
		return useDepart;
	}
	public void setUseDepart(String useDepart) {
		this.useDepart = useDepart;
	}
	public String getAssetAllocation() {
		return assetAllocation;
	}
	public void setAssetAllocation(String assetAllocation) {
		this.assetAllocation = assetAllocation;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public int getIfPd() {
		return ifPd;
	}
	public void setIfPd(int ifPd) {
		this.ifPd = ifPd;
	}

	public Short getStatus() {
		return status;
	}
	public void setStatus(Short status) {
		this.status = status;
	}

	public Short getEquipGenre() {
		return equipGenre;
	}

	public void setEquipGenre(Short equipGenre) {
		this.equipGenre = equipGenre;
	}

	public String getUsePosition() {
		return usePosition;
	}

	public void setUsePosition(String usePosition) {
		this.usePosition = usePosition;
	}

	public Short getSource() {
		return source;
	}

	public void setSource(Short source) {
		this.source = source;
	}

	@Override
	public String toString() {
		return "Asset [id=" + id + ", equipIdentifier=" + equipIdentifier
				+ ", equipGenre=" + equipGenre + ", equipModel=" + equipModel
				+ ", usePerson=" + usePerson + ", useDepart=" + useDepart
				+ ", usePosition=" + usePosition + ", condition=" + condition
				+ ", source=" + source + ", assetAllocation=" + assetAllocation
				+ ", buyTime=" + buyTime + ", usedTime=" + usedTime
				+ ", modifyTime=" + modifyTime + ", ifPd=" + ifPd + "]";
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getItCode() {
		return itCode;
	}

	public void setItCode(String itCode) {
		this.itCode = itCode;
	}
}
